home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / shaw / vbits16 / vbitsvw.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-13  |  2.4 KB  |  103 lines

  1. // vbitsvw.cpp : implementation of the CVbits16View class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "vbits16.h"
  6.  
  7. #include "vbitsdoc.h"
  8. #include "vbitsvw.h"
  9. #include "newdialo.h"
  10.  
  11. #ifdef _DEBUG
  12. #undef THIS_FILE
  13. static char BASED_CODE THIS_FILE[] = __FILE__;
  14. #endif
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CVbits16View
  18.  
  19. IMPLEMENT_DYNCREATE(CVbits16View, CEditView)
  20.  
  21. BEGIN_MESSAGE_MAP(CVbits16View, CEditView)
  22.     //{{AFX_MSG_MAP(CVbits16View)
  23.     ON_COMMAND(ID_VIEW_NEWDIALOG, OnViewNewdialog)
  24.     //}}AFX_MSG_MAP
  25.     // Standard printing commands
  26.     ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
  27.     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CVbits16View construction/destruction
  32.  
  33. CVbits16View::CVbits16View()
  34. {
  35.     // TODO: add construction code here
  36. }
  37.  
  38. CVbits16View::~CVbits16View()
  39. {
  40. }
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CVbits16View drawing
  44.  
  45. void CVbits16View::OnDraw(CDC* pDC)
  46. {
  47.     CVbits16Doc* pDoc = GetDocument();
  48.     ASSERT_VALID(pDoc);
  49.  
  50.     // TODO: add draw code for native data here
  51. }
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CVbits16View printing
  55.  
  56. BOOL CVbits16View::OnPreparePrinting(CPrintInfo* pInfo)
  57. {
  58.     // default CEditView preparation
  59.     return CEditView::OnPreparePrinting(pInfo);
  60. }
  61.  
  62. void CVbits16View::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
  63. {
  64.     // Default CEditView begin printing.
  65.     CEditView::OnBeginPrinting(pDC, pInfo);
  66. }
  67.  
  68. void CVbits16View::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
  69. {
  70.     // Default CEditView end printing
  71.     CEditView::OnEndPrinting(pDC, pInfo);
  72. }
  73.  
  74. /////////////////////////////////////////////////////////////////////////////
  75. // CVbits16View diagnostics
  76.  
  77. #ifdef _DEBUG
  78. void CVbits16View::AssertValid() const
  79. {
  80.     CEditView::AssertValid();
  81. }
  82.  
  83. void CVbits16View::Dump(CDumpContext& dc) const
  84. {
  85.     CEditView::Dump(dc);
  86. }
  87.  
  88. CVbits16Doc* CVbits16View::GetDocument() // non-debug version is inline
  89. {
  90.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVbits16Doc)));
  91.     return (CVbits16Doc*)m_pDocument;
  92. }
  93. #endif //_DEBUG
  94.  
  95. /////////////////////////////////////////////////////////////////////////////
  96. // CVbits16View message handlers
  97.  
  98. void CVbits16View::OnViewNewdialog()
  99. {
  100.     CNewDialog newDlg;
  101.     newDlg.DoModal();    
  102. }
  103.